#!/usr/bin/env node

const Koa = require('koa');

const app = new Koa();

console.log('hello world');

//ctx封装着req，res
//next调用中间件
app.use((ctx,next) => {
  //parse request
  //make response
  ctx.body = 'hello koa';
});

app.listen(8080);
